.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* margin-right: 250px; 为右侧的 wordlist-container 留出空间 */
}

#wordlist-container {
    width: 250px;
    height: 70vh;
    overflow-y: auto;
    background-color: rgba(36, 59, 85, 0.8);
    padding: 20px;
    position: fixed;
    top: 20%;
    right: 5%;
    box-sizing: border-box;
    border-radius: 15px;
}

#aichat-container {
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    background-color: rgba(36, 59, 85, 0.8);
    padding: 20px;
    position: fixed;
    top: 20%;
    left: 20px;
    box-sizing: border-box;
    border-radius: 15px;
    display: none; /* 默认隐藏 */
}
.wordlist-column {
    margin-bottom: 20px;
}

.wordlist-column h3 {
    color: #ffcc00;
    margin-bottom: 10px;
}

.wordlist-column ul {
    list-style-type: none;
    padding: 0;
}

.wordlist-column li {
    color: #fff;
    margin-bottom: 5px;
}

#word-display {
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center; 
    width: 100%; 
}

#input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    width: 100%;
    flex-wrap: wrap; /* 允许在需要时换行 */
}

@import url('https://fonts.googleapis.com/css2?family=Bungee+Shade&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&display=swap');

#combo-display {
    font-size: 48px;
    color: #ffcc00;
    margin-top: 20px;
    text-shadow: 0 0 20px #ffcc00, 0 0 40px #ffcc00, 0 0 60px #ff4500;
    opacity: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 80%; /* Adjust this value to position it below the input box */
}

#timer-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.5);
}

#timer {
    width: 100%;
    height: 10px;
    background-color: #333;
}

.base-timer {
    position: relative;
    width: 100%;
    height: 10px;
}

.base-timer__path-elapsed {
    stroke-width: 10px;
    stroke: grey;
}

.base-timer__path-remaining {
    stroke-width: 10px;
    stroke-linecap: round;
    transform: rotate(0deg);
    transform-origin: left;
    transition: 1s linear all;
    fill-rule: nonzero;
    stroke: currentColor;
}

.base-timer__svg {
    transform: scaleX(1);
}

.base-timer__label {
    position: absolute;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    font-size: 24px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    color: #fff;
}

.base-timer__circle {
    fill: none;
    stroke: none;
}

.base-timer__path-remaining.green {
    color: rgb(65, 184, 131);
}

.base-timer__path-remaining.orange {
    color: orange;
}

.base-timer__path-remaining.red {
    color: red;
}

#score {
    position: fixed;
    top: 70px;
    right: 20px;
    font-size: 24px;
    color: #fff;
    z-index: 20;
}

#final-score {
    position: fixed;
    top: 60px;
    right: 20px;
    font-size: 28px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#final-score.show {
    opacity: 1;
}

.letter-input {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    font-size: 50px !important;
    font-family: 'Fredoka One', cursive !important;
    font-weight: bold;
    text-align: center;
    border: 2px solid #243B55 !important;;
    background: #243B55 !important;;
    color: #fff !important;;
    outline: none;
    border-radius: 5px;
    transition: all 0.2s ease;
    caret-color: transparent;
    padding: 0;
    margin: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: none !important;
    resize: none;
}

.letter-input::-webkit-input-placeholder {
    text-align: center;
    line-height: 50px;
}

.letter-input:-moz-placeholder {
    text-align: center;
    line-height: 50px;
}

.letter-input::-moz-placeholder {
    text-align: center;
    line-height: 50px;
}

.letter-input:-ms-input-placeholder {
    text-align: center;
    line-height: 50px;
}

.letter-input.correct {
    border-color: #00ff00;
    background: #00ff00;
    color: #000;
    border-color: #00ff00 !important;
    background: #00ff00 !important;
    color: #000 !important;
}

.letter-input.incorrect {
    border-color: #ff0000;
    background: #ff0000;
    color: #000;
    border-color: #ff0000 !important;
    background: #ff0000 !important;
    color: #000 !important;
}

.letter-effect {
    position: absolute;
    font-size: 30px;
    opacity: 0;
    animation: sparkle 1s ease-in-out;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes sparkle {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 1;
        color: #ffcc00;
    }
    50% {
        transform: translateX(-50%) scale(1.5);
        opacity: 0.8;
        color: #ff4500;
    }
    100% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
        color: #ffcc00;
    }
}

.combo-visible {
    opacity: 1 !important;
}

@keyframes comboAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.7);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
}

.letter-input.focused {
    box-shadow: 0 0 10px 5px #ffcc00;
    animation: breathe 0.5s infinite alternate;
}

@keyframes breathe {
    from {
        box-shadow: 0 0 10px 0px #ffcc00;
    }
    to {
        box-shadow: 0 0 10px 5px #ffcc00;
    }
}

.logo-container {
    position: absolute;
    top: 10px;
    left: 5%;
    display: flex;
    align-items: center;
    z-index: 20;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 20px;
    color: #fff;
    margin-left: 10px;
}

.explosion {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255,215,0,1) 0%, rgba(255,69,0,1) 50%, rgba(255,0,0,0) 100%);
    border-radius: 50%;
    animation: explode 1s ease-out;
    pointer-events: none;
    z-index: 999;
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.5);
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

.times-up {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 43px; /* Reduced from 72px */
    color: #ff0000;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 12px 24px; /* Reduced from 20px 40px */
    border: 3px solid #ff0000; /* Reduced from 5px */
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.7); /* Reduced from 20px */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}

.times-up.show {
    opacity: 1;
}

#username {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

#score {
    position: fixed;
    top: 70px;
    right: 5%;
    font-size: 24px;
    color: #fff;
    z-index: 20;
    
}

.game-title {
    position: absolute;
    top: 120px; /* Increased top value to move it below the score */
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    color: #ffcc00;    margin: 0;
    padding: 0;
    z-index: 10;
    width: calc(100% - 250px); /*  wordlist-container 的宽度 */
    text-align: center; /* Center the text */
}

.completed-word {
    font-size: 24px;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #1e3a8a;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
    transition: all 0.3s ease;
}
.completion-image {
    position: fixed;
    bottom: 20%;
    left: 50%;
    transform: translate(-50%, 50%) scale(3); /* 初始大小设为3倍 */
    width: 200px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.completion-image.show {
    opacity: 1;
}

.completion-image.animate {
    animation: stampEffect 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stampEffect {
    0% {
        transform: translate(-50%, 50%) scale(3);
    }
    70% {
        transform: translate(-50%, 50%) scale(0.9); /* 缩小到0.7倍 */
    }
    85% {
        transform: translate(-50%, 50%) scale(1.0); /* 反弹效果 */
    }
    100% {
        transform: translate(-50%, 50%) scale(0.9); /* 终小为0.9倍 */
    }
}

#word-results {
    list-style-type: none;
    padding: 0;
    width: 100%;
}

#word-results li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px; /* Reduced from 15px */
    font-size: 16px; /* Reduced from 18px */
    padding: 6px 10px; /* Reduced vertical padding */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px; /* Slightly reduced for a more compact look */
    transition: background-color 0.3s ease;
}

#word-results li:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.word-result-icon {
    font-size: 18px; /* Reduced from 24px */
    width: 24px; /* Reduced from 30px */
    height: 24px; /* Reduced from 30px */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.word-result-icon.correct {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.2);
}

.word-result-icon.incorrect {
    color: #F44336;
    background-color: rgba(244, 67, 54, 0.2);
}

.profile-button {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 15px;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(45deg, #1E3A8A, #2563EB, #3B82F6, #60A5FA);
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2), 0 0 10px rgba(37, 99, 235, 0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.profile-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: all 0.8s ease;
}

.profile-button:hover::before {
    left: 100%;
    top: 100%;
}

.username, .game-title, .letter-input, #combo-display, .times-up, .completed-word {
    font-family: 'Fredoka One', cursive;
}

/* 如果需要保留某些元素使用 Orbitron 字体，可以单独设置 */
/* .base-timer__label {
    font-family: 'Orbitron', 'Fredoka One', sans-serif;
} */ 
/* 更新其他使用体的元素*/
#word-display {
    font-family: Arial, sans-serif;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo-link:hover {
    text-decoration: none; /* 添加这一行 */
}

/* 移除或注释掉其他字体导入 */
/* @import url('https://fonts.googleapis.com/css2?family=Bungee+Shade&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&display=swap'); */

.skip-button {
    font-family: 'Fredoka', cursive;
    margin-top: 15px;
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #3498db;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    max-width: 100px;
}

.skip-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.skip-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skip-button:disabled {
    background-color: #808080;  /* 灰色背景 */
    cursor: not-allowed;  /* 禁用状态的鼠标样式 */
    opacity: 0.6;  /* 降低透明度 */
    transform: none;  /* 禁用 hover 效果 */
    box-shadow: none;  /* 移除阴影 */
}

/* 禁用状态下移除 hover 效果 */
.skip-button:disabled:hover {
    background-color: #808080;
    transform: none;
    box-shadow: none;
}

.word-meaning {
    margin-bottom: 10px;
}

.word-example {
    font-size: 18px;
    margin-top: 10px;
}

 /* ... existing styles ... */

 .audio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.audio-icon:hover {
    transform: scale(1.1);
}

.audio-icon svg {
    width: 100%;
    height: 100%;
}

.audio-icon .speaker {
    fill: #ffd700; /* 更柔和的金色 */
}

.audio-icon .wave1,
.audio-icon .wave2,
.audio-icon .wave3 {
    stroke: #ffd700; /* 匹配扬声器颜色 */
    stroke-width: 2;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.6)); /* 添加微妙的发光效果 */
}

.audio-icon .wave1 {
    opacity: 0.3;
}

.audio-icon .wave2 {
    opacity: 0.1;
}

.audio-icon .wave3 {
    opacity: 0;
}

.audio-icon:hover .wave1,
.audio-icon:hover .wave2,
.audio-icon:hover .wave3 {
    opacity: 0.6;
}

.audio-icon.playing .wave1 {
    animation: wave 1.5s infinite;
}

.audio-icon.playing .wave2 {
    animation: wave 1.5s infinite 0.4s;
}

.audio-icon.playing .wave3 {
    animation: wave 1.5s infinite 0.8s;
}

@keyframes wave {
    0% {
        opacity: 0.2;
        transform: translateX(-3px) scaleY(0.8);
    }
    50% {
        opacity: 1;
        transform: translateX(0) scaleY(1);
    }
    100% {
        opacity: 0.2;
        transform: translateX(3px) scaleY(0.8);
    }
}

.word-phonetic {
    display: inline-flex;
    align-items: center;
}

#start-game-button {
    font-family: 'Fredoka One', cursive;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    background-color: #4CAF50;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* 确保按钮在毛玻璃效果之上 */
    max-width: 200px; /* 限制最大宽度 */
    width: 100%; /* 在最大宽度内填充可用空间 */
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 超出显示省略号 */
}

#start-game-button:hover {
    background-color: #45a049;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#blur-overlay {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 500px);
    height: 50%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(20, 30, 48, 0.2); /* 更新这一行 */
    z-index: 999;
    transition: all 0.3s ease;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-left: 10px; /* Space between input and spinner */
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.input-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-container {
    position: relative;
    display: inline-block;
}

.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid transparent;
    border-top: 4px solid #FFD700; /* Yellow color */
    border-radius: 50%;
    width: 100%;
    height: 100%;
    animation: spin 1s linear infinite;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.remaining-words {
    position: absolute;
    top: 180px; /* Positioned below the game title */
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: #ffffff;
    font-family: 'Fredoka', cursive;
    text-align: center;
    z-index: 10;
    width: calc(100% - 250px);
}


/* 确保游戏内容正确定位 */
.container {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100vh;
}



